package com.example.helloffmpeg.system

object FfmpegHelper {
    var hasLoad = false
    fun init(){
        if(!hasLoad){
            System.loadLibrary("ffmpeg-lib")
            hasLoad=true
        }
    }

    external fun getVersion():String

    external fun printFileInfo(filePath: String?):String

    external fun remux(filePath: String?, dstFilePath: String?): Int

    external fun decodeVideo(filePath: String?, dstFilePath: String?): Int

    external fun decodeAudio(filePath: String?, dstFilePath: String?): Int

    external fun listAllEncoders()

    external fun scaleVideo(dstFilePath: String?): Int

    external fun decode(inputFilePath:String,videoOutPutFilePath:String,audioOutPutFilePath:String):Boolean
    external fun encode(videoInputFilePath:String,audioInputFilePath:String,outputFilePath:String):Boolean

    external fun convertAudioToAAC(inputFilePath: String?, outputFilePath: String?): Boolean
    external fun convertVideoToH264(inputFilePath: String?, outputFilePath: String?): Boolean
}